import javax.xml.bind.annotation.*;
import java.util.List;
import DataType.*;


@XmlRootElement(name = "virtualsensor", namespace = "http://www.w3school.com.cn")
public class VSensorConfig {

	private List<KeyValue> addressing;
	private String fileName;
	private int generate_rate;
	private String name;
	private String description;
	private String sensorType;
	private int sensorId;
	private int gatewayId;

	@XmlElement(name = "type")
	public String getSensorType() {
		this.sensorType = this.sensorType.trim().toLowerCase();
		return sensorType;
	}

	public void setSensorType(String sensorType) {
		this.sensorType = sensorType;
	}

	@XmlElement(name = "addressing")
	public List<KeyValue> getAddressing() {
		return addressing;
	}

	public void setAddressing(List<KeyValue> addressing) {
		this.addressing = addressing;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@XmlElement(name = "GenerateRate")
	public int getGenerate_rate() {
		return generate_rate;
	}

	public void setGenerate_rate(int generate_rate) {
		this.generate_rate = generate_rate;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@XmlElement(name = "description")
	public String getDescription() {
		this.description = this.description.trim();
		return description;
	}

	@XmlElement
	public String getName() {
		if (this.name == null)
			return null;
		this.name = this.name.trim();
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@XmlElement(name = "SensorID")
	public int getSensorID() {
		return this.sensorId;
	}

	public void setSensorID(int uuid) {
		this.sensorId = uuid;
	}

	@XmlElement(name = "GatewayID")
	public int getGatewayId() {
		return gatewayId;
	}

	public void setGatewayId(int gatewayId) {
		this.gatewayId = gatewayId;
	}

}
